#ifndef BOARD_H
#define BOARD_H

enum
{
	UNOCCUPIED = 0,
	PLAYER_X = 1,
	PLAYER_O = 2,
	GAME_DRAW = 3,
	IN_PROGRESS = 4,
	GAME_WIN_X = 5,
	GAME_WIN_O = 6
};

struct Board;

#define NUMSLOTS 9
#define CLIENT_WINDOW_GAME_X_LEFT	0
#define CLIENT_WINDOW_GAME_X_RIGHT	300
#define CLIENT_WINDOW_GAME_Y_TOP	0
#define CLIENT_WINDOW_GAME_Y_BOTTOM	300
#define CLIENT_WINDOW_INFO_X_LEFT	0
#define CLIENT_WINDOW_INFO_X_RIGHT	300
#define CLIENT_WINDOW_INFO_Y_TOP	300
#define CLIENT_WINDOW_INFO_Y_BOTTOM	350

void CreateNewBoard(void);
void ResetBoard(void);
void DeleteBoard(void);

unsigned int GetBoardSizeX(void);
unsigned int GetBoardSizeY(void);

unsigned int GetBoardSlotFromCoords(unsigned int X, unsigned int Y);

unsigned int GetOccupation(unsigned int Slot);
unsigned int SetOccupation(unsigned int Slot, unsigned int Player);

unsigned int GetCurrentPlayer(void);

unsigned int PlayerMove(unsigned int Slot, unsigned int Player);
unsigned int GetCurrentNumMoves(void);
unsigned int CheckForWin(void);
unsigned int GetGameState(void);

void RestartGame(void);

char * GetInfoString(void);
char * GetWinsString(void);

unsigned int GetNumXWins(void);
unsigned int GetNumOWins(void);
unsigned int GetNumDraws(void);
void ClearStats(void);

void AI_Move(void);
unsigned int GetAIActiveStatus(void);
unsigned int ToggleAIActive(void);
unsigned int GetLastXMove(void);

#endif